Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

umqtt.simple: Restore legacy ssl/ssl_params arguments. #936

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dpgeorge
Copy link
Member

@dpgeorge dpgeorge commented Nov 7, 2024

Summary

Commit 35d41db changed the API for using SSL with umqtt, but only did a minor version increase. This broke various uses of this library, eg
https://github.com/aws-samples/aws-iot-core-getting-started-micropython

Reinstate the original API for specifying an SSL connection. This library now supports the following:

  • default, ssl=None or ssl=False: no SSL
  • ssl=True and optional ssl_params specified: use ssl.wrap_socket
  • ssl=: use provided SSL context to wrap socket

Testing

TODO

Commit 35d41db changed the API for using
SSL with umqtt, but only did a minor version increase.  This broke various
uses of this library, eg
https://github.com/aws-samples/aws-iot-core-getting-started-micropython

Reinstate the original API for specifying an SSL connection.  This library
now supports the following:
- default, ssl=None or ssl=False: no SSL
- ssl=True and optional ssl_params specified: use ssl.wrap_socket
- ssl=<SSLContext instance>: use provided SSL context to wrap socket

Signed-off-by: Damien George <[email protected]>
@keenanjohnson
Copy link

Obviously I'm not a reviewer, but looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants